package com.example.myapp.Activity;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import com.example.myapp.ADO.ActivityManager;
import com.example.myapp.R;

public class Help extends AppCompatActivity {





    public void onBackPressed() {
        //此处写退向后台的处理
        finish();
    }//手机返回键

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ActivityManager.getInstance().addActivity(this);
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);  //隐藏标题栏
        setContentView(R.layout.help);
        LinearLayout bt0=findViewById(R.id.bt0);
        LinearLayout bt1=findViewById(R.id.bt1);
        LinearLayout bt2=findViewById(R.id.bt2);
        LinearLayout bt3=findViewById(R.id.bt3);
        LinearLayout bt4=findViewById(R.id.bt4);

        ImageView help_back=findViewById(R.id.help_back);
        help_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        bt0.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder builder=new AlertDialog.Builder(Help.this);
                builder.setTitle("关于莆院帮平台");
                final TextView textView =new TextView(Help.this);
                builder.setView(textView);
                textView.setPadding(10,10,10,10);
                textView.setText("关于莆院帮平台,是个人打造的平台，由于资金原因，服务器没有那么好，所以体验起来可能稍微卡顿，希望能多多包涵。有什么问题可以跟我探讨。");
                builder.setNegativeButton("知道了",null);
                builder.show();

            }
        });
        bt1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder builder=new AlertDialog.Builder(Help.this);
                builder.setTitle("提示手机号无法登录？");
                final TextView textView =new TextView(Help.this);
                builder.setView(textView);
                textView.setPadding(10,10,10,10);
                textView.setText("您手机号可能被占用，请重新换个手机号注册登录，也可能会是无服务器有问题。");
                builder.setNegativeButton("知道了",null);
                builder.show();

            }
        });
        bt2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder builder=new AlertDialog.Builder(Help.this);
                builder.setTitle("忘记密码？");
                final TextView textView =new TextView(Help.this);
                builder.setView(textView);
                textView.setPadding(10,10,10,10);
                textView.setText("因为服务器的原因，短信查找密码有可能会出错，因为服务器的需要交钱的原因，小文可能" +
                        "有资金缺乏的时候，所以忘记密码的小伙伴还可以私信客服，根据一定的问题进行验证找回。");
                builder.setNegativeButton("知道了",null);
                builder.show();

            }
        });
        bt3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder builder=new AlertDialog.Builder(Help.this);
                builder.setTitle("账号为什么会被禁言？");
                final TextView textView =new TextView(Help.this);
                builder.setView(textView);
                textView.setPadding(10,10,10,10);
                textView.setText("发布涉及政治、色情、暴力、恐怖、等不符合国家要求的信息，会被禁言哦，请自觉遵守《莆院帮社区管理规范》共同营造一个青春阳光的网络环境");
                builder.setNegativeButton("知道了",null);
                builder.show();

            }
        });

        bt4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlertDialog.Builder builder=new AlertDialog.Builder(Help.this);
                builder.setTitle("账号被禁封怎么办？");
                final TextView textView =new TextView(Help.this);
                builder.setView(textView);
                textView.setPadding(10,10,10,10);
                textView.setText("封号了需要联系客服，并且知错悔改，写悔过书即可找回账号");
                builder.setNegativeButton("知道了",null);
                builder.show();

            }
        });
    }
}
